package com.xue566.controller;

import com.xue566.config.LogPointer;
import com.xue566.entity.StudentEntity;
import com.xue566.service.IStudentService;
import com.xue566.util.ResultBody;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Author: Wuzh
 * @Description:
 * @Date Created in 11:09 2020/8/23
 * @return
 */
@RestController
@RequestMapping("/student")
@Slf4j
public class StudentController {

    @Resource
    private IStudentService iStudentService;

    /**
     * @Author: Wuzh
     * @Description: 服务端查询学生信息列表
     * @Data:
     */
    @LogPointer(value = "学生服务端日志")
    @RequestMapping("/queryList")
    public ResultBody<StudentEntity> queryList(@RequestBody StudentEntity studentEntity){
        log.info("student - {} - {}", studentEntity.getTrackId(), studentEntity);
        return iStudentService.queryList(studentEntity);
    }
}
